package cn.itcast.domain;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class Room {
    private Integer id;
    private String roomNumber;
    private String roomType;
    private String roomPrice;
    private String roomDescribe;
    private String clientId;
    private String roomFlag;
   private Client client;

    @Override
    public String toString() {
        return "Room{" +
                "id=" + id +
                ", roomNumber='" + roomNumber + '\'' +
                ", roomType='" + roomType + '\'' +
                ", roomPrice='" + roomPrice + '\'' +
                ", roomDescribe='" + roomDescribe + '\'' +
                '}';
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Client getClient() {
        return client;
    }

    public void setClient(Client client) throws ParseException {
       /* Calendar calendarEnd = Calendar.getInstance();
        calendarEnd.setTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss SSS").parse(client.getClientEndtime()));

        Date date = new Date(calendarEnd.getTimeInMillis() -System.currentTimeMillis());
        SimpleDateFormat format = new SimpleDateFormat("dd日 hh:mm:ss SSS a");
        this.client = client;
        this.client.setClientEndtime(format.format(date));*/
       this.client=client;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getRoomNumber() {
        return roomNumber;
    }

    public void setRoomNumber(String roomNumber) {
        this.roomNumber = roomNumber;
    }

    public String getRoomType() {
        return roomType;
    }

    public void setRoomType(String roomType) {
        this.roomType = roomType;
    }

    public String getRoomPrice() {
        return roomPrice;
    }

    public void setRoomPrice(String roomPrice) {
        this.roomPrice = roomPrice;
    }

    public String getRoomDescribe() {
        return roomDescribe;
    }

    public void setRoomDescribe(String roomDescribe) {
        this.roomDescribe = roomDescribe;
    }

    public String getClientId() {
        return clientId;
    }

    public void setClientId(String clientId) {
        this.clientId = clientId;
    }

    public String getRoomFlag() {
        return roomFlag;
    }

    public void setRoomFlag(String roomFlag) {
        this.roomFlag = roomFlag;
    }
}
